<!-- HTML header for doxygen 1.8.6-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/xhtml;charset=utf-8" http-equiv="Content-Type"/>
<meta content="IE=9" http-equiv="X-UA-Compatible"/>
<meta content="Doxygen 1.8.13" name="generator"/>
<title>OpenCV: cv::ximgproc::SuperpixelSEEDS Class Reference</title>
<link href="../../opencv.ico" rel="shortcut icon" type="image/x-icon"/>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script src="../../jquery.js" type="text/javascript"></script>
<script src="../../dynsections.js" type="text/javascript"></script>
<script src="../../tutorial-utils.js" type="text/javascript"></script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script src="../../search/searchdata.js" type="text/javascript"></script>
<script src="../../search/search.js" type="text/javascript"></script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
//<![CDATA[
MathJax.Hub.Config(
{
  TeX: {
      Macros: {
          matTT: [ "\\[ \\left|\\begin{array}{ccc} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \\end{array}\\right| \\]", 9],
          fork: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ \\end{array} \\right.", 4],
          forkthree: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ #5 & \\mbox{#6}\\\\ \\end{array} \\right.", 6],
          forkfour: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ #5 & \\mbox{#6}\\\\ #7 & \\mbox{#8}\\\\ \\end{array} \\right.", 8],
          vecthree: ["\\begin{bmatrix} #1\\\\ #2\\\\ #3 \\end{bmatrix}", 3],
          vecthreethree: ["\\begin{bmatrix} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \\end{bmatrix}", 9],
          cameramatrix: ["#1 = \\begin{bmatrix} f_x & 0 & c_x\\\\ 0 & f_y & c_y\\\\ 0 & 0 & 1 \\end{bmatrix}", 1],
          distcoeffs: ["(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6 [, s_1, s_2, s_3, s_4[, \\tau_x, \\tau_y]]]]) \\text{ of 4, 5, 8, 12 or 14 elements}"],
          distcoeffsfisheye: ["(k_1, k_2, k_3, k_4)"],
          hdotsfor: ["\\dots", 1],
          mathbbm: ["\\mathbb{#1}", 1],
          bordermatrix: ["\\matrix{#1}", 1]
      }
  }
}
);
//]]>
</script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js" type="text/javascript"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css"/>
<link href="../../stylesheet.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<!--#include virtual="/google-search.html"-->
<table cellpadding="0" cellspacing="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="../../opencv-logo-small.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">OpenCV
    <span id="projectnumber">4.5.2</span>
   </div>
   <div id="projectbrief">Open Source Computer Vision</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
<script src="../../menudata.js" type="text/javascript"></script>
<script src="../../menu.js" type="text/javascript"></script>
<script type="text/javascript">
$(function() {
  initMenu('../../',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow" onkeydown="return searchBox.OnSearchSelectKey(event)" onmouseout="return searchBox.OnSearchSelectHide()" onmouseover="return searchBox.OnSearchSelectShow()">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe frameborder="0" id="MSearchResults" name="MSearchResults" src="javascript:void(0)">
</iframe>
</div>
<div class="navpath" id="nav-path">
  <ul>
<li class="navelem"><a class="el" href="../../d2/d75/namespacecv.html">cv</a></li><li class="navelem"><a class="el" href="../../d9/d29/namespacecv_1_1ximgproc.html">ximgproc</a></li><li class="navelem"><a class="el" href="../../df/d81/classcv_1_1ximgproc_1_1SuperpixelSEEDS.html">SuperpixelSEEDS</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> |
<a href="../../db/d0c/classcv_1_1ximgproc_1_1SuperpixelSEEDS-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">cv::ximgproc::SuperpixelSEEDS Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span><div class="ingroups"><a class="el" href="../../df/d2d/group__ximgproc.html">Extended Image Processing</a> » <a class="el" href="../../df/d6c/group__ximgproc__superpixel.html">Superpixels</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<p>Class implementing the SEEDS (Superpixels Extracted via Energy-Driven Sampling) superpixels algorithm described in <a class="el" href="../../d0/de3/citelist.html#CITEREF_VBRV14">[257]</a> .  
 <a href="../../df/d81/classcv_1_1ximgproc_1_1SuperpixelSEEDS.html#details">More...</a></p>
<p><code>#include &lt;opencv2/ximgproc/seeds.hpp&gt;</code></p>
<div class="dynheader">
Inheritance diagram for cv::ximgproc::SuperpixelSEEDS:</div>
<div class="dyncontent">
 <div class="center">
  <img alt="" src="../../df/d81/classcv_1_1ximgproc_1_1SuperpixelSEEDS.png" usemap="#cv::ximgproc::SuperpixelSEEDS_map"/>
  <map id="cv::ximgproc::SuperpixelSEEDS_map" name="cv::ximgproc::SuperpixelSEEDS_map">
<area alt="cv::Algorithm" coords="0,0,190,24" href="../../d3/d46/classcv_1_1Algorithm.html" shape="rect" title="This is a base class for all more or less complex algorithms in OpenCV. "/>
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a790e3775881926e1a56d1857527ef45d"><td align="right" class="memItemLeft" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d81/classcv_1_1ximgproc_1_1SuperpixelSEEDS.html#a790e3775881926e1a56d1857527ef45d">~SuperpixelSEEDS</a> ()</td></tr>
<tr class="separator:a790e3775881926e1a56d1857527ef45d"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a077f568b33efa96a972b81640c501457"><td align="right" class="memItemLeft" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d81/classcv_1_1ximgproc_1_1SuperpixelSEEDS.html#a077f568b33efa96a972b81640c501457">getLabelContourMask</a> (<a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> image, bool thick_line=false)=0</td></tr>
<tr class="memdesc:a077f568b33efa96a972b81640c501457"><td class="mdescLeft"> </td><td class="mdescRight">Returns the mask of the superpixel segmentation stored in <a class="el" href="../../df/d81/classcv_1_1ximgproc_1_1SuperpixelSEEDS.html" title="Class implementing the SEEDS (Superpixels Extracted via Energy-Driven Sampling) superpixels algorithm...">SuperpixelSEEDS</a> object.  <a href="#a077f568b33efa96a972b81640c501457">More...</a><br/></td></tr>
<tr class="separator:a077f568b33efa96a972b81640c501457"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a093b40b471c2514f2a846799889a1b54"><td align="right" class="memItemLeft" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d81/classcv_1_1ximgproc_1_1SuperpixelSEEDS.html#a093b40b471c2514f2a846799889a1b54">getLabels</a> (<a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> labels_out)=0</td></tr>
<tr class="memdesc:a093b40b471c2514f2a846799889a1b54"><td class="mdescLeft"> </td><td class="mdescRight">Returns the segmentation labeling of the image.  <a href="#a093b40b471c2514f2a846799889a1b54">More...</a><br/></td></tr>
<tr class="separator:a093b40b471c2514f2a846799889a1b54"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aa0302b0c60c86a8e6cbb437542b2f9f5"><td align="right" class="memItemLeft" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d81/classcv_1_1ximgproc_1_1SuperpixelSEEDS.html#aa0302b0c60c86a8e6cbb437542b2f9f5">getNumberOfSuperpixels</a> ()=0</td></tr>
<tr class="memdesc:aa0302b0c60c86a8e6cbb437542b2f9f5"><td class="mdescLeft"> </td><td class="mdescRight">Calculates the superpixel segmentation on a given image stored in <a class="el" href="../../df/d81/classcv_1_1ximgproc_1_1SuperpixelSEEDS.html" title="Class implementing the SEEDS (Superpixels Extracted via Energy-Driven Sampling) superpixels algorithm...">SuperpixelSEEDS</a> object.  <a href="#aa0302b0c60c86a8e6cbb437542b2f9f5">More...</a><br/></td></tr>
<tr class="separator:aa0302b0c60c86a8e6cbb437542b2f9f5"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:afc35736ae52b277a1708b54037598cbb"><td align="right" class="memItemLeft" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d81/classcv_1_1ximgproc_1_1SuperpixelSEEDS.html#afc35736ae52b277a1708b54037598cbb">iterate</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> img, int num_iterations=4)=0</td></tr>
<tr class="memdesc:afc35736ae52b277a1708b54037598cbb"><td class="mdescLeft"> </td><td class="mdescRight">Calculates the superpixel segmentation on a given image with the initialized parameters in the <a class="el" href="../../df/d81/classcv_1_1ximgproc_1_1SuperpixelSEEDS.html" title="Class implementing the SEEDS (Superpixels Extracted via Energy-Driven Sampling) superpixels algorithm...">SuperpixelSEEDS</a> object.  <a href="#afc35736ae52b277a1708b54037598cbb">More...</a><br/></td></tr>
<tr class="separator:afc35736ae52b277a1708b54037598cbb"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="inherit_header pub_methods_classcv_1_1Algorithm"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classcv_1_1Algorithm')"><img alt="-" src="../../closed.png"/> Public Member Functions inherited from <a class="el" href="../../d3/d46/classcv_1_1Algorithm.html">cv::Algorithm</a></td></tr>
<tr class="memitem:a827c8b2781ed17574805f373e6054ff1 inherit pub_methods_classcv_1_1Algorithm"><td align="right" class="memItemLeft" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d46/classcv_1_1Algorithm.html#a827c8b2781ed17574805f373e6054ff1">Algorithm</a> ()</td></tr>
<tr class="separator:a827c8b2781ed17574805f373e6054ff1 inherit pub_methods_classcv_1_1Algorithm"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a8ae826127fa0f1f8d10a24841bd376f8 inherit pub_methods_classcv_1_1Algorithm"><td align="right" class="memItemLeft" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d46/classcv_1_1Algorithm.html#a8ae826127fa0f1f8d10a24841bd376f8">~Algorithm</a> ()</td></tr>
<tr class="separator:a8ae826127fa0f1f8d10a24841bd376f8 inherit pub_methods_classcv_1_1Algorithm"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aec9c965448e4dc851d7cacd3abd84cd1 inherit pub_methods_classcv_1_1Algorithm"><td align="right" class="memItemLeft" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d46/classcv_1_1Algorithm.html#aec9c965448e4dc851d7cacd3abd84cd1">clear</a> ()</td></tr>
<tr class="memdesc:aec9c965448e4dc851d7cacd3abd84cd1 inherit pub_methods_classcv_1_1Algorithm"><td class="mdescLeft"> </td><td class="mdescRight">Clears the algorithm state.  <a href="../../d3/d46/classcv_1_1Algorithm.html#aec9c965448e4dc851d7cacd3abd84cd1">More...</a><br/></td></tr>
<tr class="separator:aec9c965448e4dc851d7cacd3abd84cd1 inherit pub_methods_classcv_1_1Algorithm"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ab6a18f1825475643e94381697d413972 inherit pub_methods_classcv_1_1Algorithm"><td align="right" class="memItemLeft" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d46/classcv_1_1Algorithm.html#ab6a18f1825475643e94381697d413972">empty</a> () const</td></tr>
<tr class="memdesc:ab6a18f1825475643e94381697d413972 inherit pub_methods_classcv_1_1Algorithm"><td class="mdescLeft"> </td><td class="mdescRight">Returns true if the <a class="el" href="../../d3/d46/classcv_1_1Algorithm.html" title="This is a base class for all more or less complex algorithms in OpenCV. ">Algorithm</a> is empty (e.g. in the very beginning or after unsuccessful read.  <a href="../../d3/d46/classcv_1_1Algorithm.html#ab6a18f1825475643e94381697d413972">More...</a><br/></td></tr>
<tr class="separator:ab6a18f1825475643e94381697d413972 inherit pub_methods_classcv_1_1Algorithm"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a286fc82744ccab3d248aca44524266a9 inherit pub_methods_classcv_1_1Algorithm"><td align="right" class="memItemLeft" valign="top">virtual <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d46/classcv_1_1Algorithm.html#a286fc82744ccab3d248aca44524266a9">getDefaultName</a> () const</td></tr>
<tr class="separator:a286fc82744ccab3d248aca44524266a9 inherit pub_methods_classcv_1_1Algorithm"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aef2ad3f4145bd6e8c3664eb1c4b5e1e6 inherit pub_methods_classcv_1_1Algorithm"><td align="right" class="memItemLeft" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d46/classcv_1_1Algorithm.html#aef2ad3f4145bd6e8c3664eb1c4b5e1e6">read</a> (const <a class="el" href="../../de/dd9/classcv_1_1FileNode.html">FileNode</a> &amp;fn)</td></tr>
<tr class="memdesc:aef2ad3f4145bd6e8c3664eb1c4b5e1e6 inherit pub_methods_classcv_1_1Algorithm"><td class="mdescLeft"> </td><td class="mdescRight">Reads algorithm parameters from a file storage.  <a href="../../d3/d46/classcv_1_1Algorithm.html#aef2ad3f4145bd6e8c3664eb1c4b5e1e6">More...</a><br/></td></tr>
<tr class="separator:aef2ad3f4145bd6e8c3664eb1c4b5e1e6 inherit pub_methods_classcv_1_1Algorithm"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a0a880744bc4e3f45711444571df47d67 inherit pub_methods_classcv_1_1Algorithm"><td align="right" class="memItemLeft" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d46/classcv_1_1Algorithm.html#a0a880744bc4e3f45711444571df47d67">save</a> (const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp;filename) const</td></tr>
<tr class="separator:a0a880744bc4e3f45711444571df47d67 inherit pub_methods_classcv_1_1Algorithm"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a1f8ad7b8add515077367fb9949a174d2 inherit pub_methods_classcv_1_1Algorithm"><td align="right" class="memItemLeft" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d46/classcv_1_1Algorithm.html#a1f8ad7b8add515077367fb9949a174d2">write</a> (<a class="el" href="../../da/d56/classcv_1_1FileStorage.html">FileStorage</a> &amp;fs) const</td></tr>
<tr class="memdesc:a1f8ad7b8add515077367fb9949a174d2 inherit pub_methods_classcv_1_1Algorithm"><td class="mdescLeft"> </td><td class="mdescRight">Stores algorithm parameters in a file storage.  <a href="../../d3/d46/classcv_1_1Algorithm.html#a1f8ad7b8add515077367fb9949a174d2">More...</a><br/></td></tr>
<tr class="separator:a1f8ad7b8add515077367fb9949a174d2 inherit pub_methods_classcv_1_1Algorithm"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a763a62d1b03042eef7d7fc3ac6c87c79 inherit pub_methods_classcv_1_1Algorithm"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d46/classcv_1_1Algorithm.html#a763a62d1b03042eef7d7fc3ac6c87c79">write</a> (const <a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt; <a class="el" href="../../da/d56/classcv_1_1FileStorage.html">FileStorage</a> &gt; &amp;fs, const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp;name=<a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a>()) const</td></tr>
<tr class="memdesc:a763a62d1b03042eef7d7fc3ac6c87c79 inherit pub_methods_classcv_1_1Algorithm"><td class="mdescLeft"> </td><td class="mdescRight">simplified API for language bindings This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.  <a href="../../d3/d46/classcv_1_1Algorithm.html#a763a62d1b03042eef7d7fc3ac6c87c79">More...</a><br/></td></tr>
<tr class="separator:a763a62d1b03042eef7d7fc3ac6c87c79 inherit pub_methods_classcv_1_1Algorithm"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="inherited"></a>
Additional Inherited Members</h2></td></tr>
<tr class="inherit_header pub_static_methods_classcv_1_1Algorithm"><td colspan="2" onclick="javascript:toggleInherit('pub_static_methods_classcv_1_1Algorithm')"><img alt="-" src="../../closed.png"/> Static Public Member Functions inherited from <a class="el" href="../../d3/d46/classcv_1_1Algorithm.html">cv::Algorithm</a></td></tr>
<tr class="memitem:a623841c33b58ea9c4847da04607e067b inherit pub_static_methods_classcv_1_1Algorithm"><td class="memTemplParams" colspan="2">template&lt;typename _Tp &gt; </td></tr>
<tr class="memitem:a623841c33b58ea9c4847da04607e067b inherit pub_static_methods_classcv_1_1Algorithm"><td align="right" class="memTemplItemLeft" valign="top">static <a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt; _Tp &gt; </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../d3/d46/classcv_1_1Algorithm.html#a623841c33b58ea9c4847da04607e067b">load</a> (const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp;filename, const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp;objname=<a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a>())</td></tr>
<tr class="memdesc:a623841c33b58ea9c4847da04607e067b inherit pub_static_methods_classcv_1_1Algorithm"><td class="mdescLeft"> </td><td class="mdescRight">Loads algorithm from the file.  <a href="../../d3/d46/classcv_1_1Algorithm.html#a623841c33b58ea9c4847da04607e067b">More...</a><br/></td></tr>
<tr class="separator:a623841c33b58ea9c4847da04607e067b inherit pub_static_methods_classcv_1_1Algorithm"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a3ba305a10d02479c13cf7d169c321547 inherit pub_static_methods_classcv_1_1Algorithm"><td class="memTemplParams" colspan="2">template&lt;typename _Tp &gt; </td></tr>
<tr class="memitem:a3ba305a10d02479c13cf7d169c321547 inherit pub_static_methods_classcv_1_1Algorithm"><td align="right" class="memTemplItemLeft" valign="top">static <a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt; _Tp &gt; </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../d3/d46/classcv_1_1Algorithm.html#a3ba305a10d02479c13cf7d169c321547">loadFromString</a> (const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp;strModel, const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp;objname=<a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a>())</td></tr>
<tr class="memdesc:a3ba305a10d02479c13cf7d169c321547 inherit pub_static_methods_classcv_1_1Algorithm"><td class="mdescLeft"> </td><td class="mdescRight">Loads algorithm from a String.  <a href="../../d3/d46/classcv_1_1Algorithm.html#a3ba305a10d02479c13cf7d169c321547">More...</a><br/></td></tr>
<tr class="separator:a3ba305a10d02479c13cf7d169c321547 inherit pub_static_methods_classcv_1_1Algorithm"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ad8c591bacb34c485f5b7a250c314fc53 inherit pub_static_methods_classcv_1_1Algorithm"><td class="memTemplParams" colspan="2">template&lt;typename _Tp &gt; </td></tr>
<tr class="memitem:ad8c591bacb34c485f5b7a250c314fc53 inherit pub_static_methods_classcv_1_1Algorithm"><td align="right" class="memTemplItemLeft" valign="top">static <a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt; _Tp &gt; </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../d3/d46/classcv_1_1Algorithm.html#ad8c591bacb34c485f5b7a250c314fc53">read</a> (const <a class="el" href="../../de/dd9/classcv_1_1FileNode.html">FileNode</a> &amp;fn)</td></tr>
<tr class="memdesc:ad8c591bacb34c485f5b7a250c314fc53 inherit pub_static_methods_classcv_1_1Algorithm"><td class="mdescLeft"> </td><td class="mdescRight">Reads algorithm from the file node.  <a href="../../d3/d46/classcv_1_1Algorithm.html#ad8c591bacb34c485f5b7a250c314fc53">More...</a><br/></td></tr>
<tr class="separator:ad8c591bacb34c485f5b7a250c314fc53 inherit pub_static_methods_classcv_1_1Algorithm"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="inherit_header pro_methods_classcv_1_1Algorithm"><td colspan="2" onclick="javascript:toggleInherit('pro_methods_classcv_1_1Algorithm')"><img alt="-" src="../../closed.png"/> Protected Member Functions inherited from <a class="el" href="../../d3/d46/classcv_1_1Algorithm.html">cv::Algorithm</a></td></tr>
<tr class="memitem:a68eeca71617474ad3d4561786f0289d2 inherit pro_methods_classcv_1_1Algorithm"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d46/classcv_1_1Algorithm.html#a68eeca71617474ad3d4561786f0289d2">writeFormat</a> (<a class="el" href="../../da/d56/classcv_1_1FileStorage.html">FileStorage</a> &amp;fs) const</td></tr>
<tr class="separator:a68eeca71617474ad3d4561786f0289d2 inherit pro_methods_classcv_1_1Algorithm"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a id="details" name="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Class implementing the SEEDS (Superpixels Extracted via Energy-Driven Sampling) superpixels algorithm described in <a class="el" href="../../d0/de3/citelist.html#CITEREF_VBRV14">[257]</a> . </p>
<p>The algorithm uses an efficient hill-climbing algorithm to optimize the superpixels' energy function that is based on color histograms and a boundary term, which is optional. The energy function encourages superpixels to be of the same color, and if the boundary term is activated, the superpixels have smooth boundaries and are of similar shape. In practice it starts from a regular grid of superpixels and moves the pixels or blocks of pixels at the boundaries to refine the solution. The algorithm runs in real-time using a single CPU. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a790e3775881926e1a56d1857527ef45d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a790e3775881926e1a56d1857527ef45d">◆ </a></span>~SuperpixelSEEDS()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual cv::ximgproc::SuperpixelSEEDS::~SuperpixelSEEDS </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a077f568b33efa96a972b81640c501457"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a077f568b33efa96a972b81640c501457">◆ </a></span>getLabelContourMask()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void cv::ximgproc::SuperpixelSEEDS::getLabelContourMask </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> </td>
          <td class="paramname"><em>image</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool </td>
          <td class="paramname"><em>thick_line</em> = <code>false</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>image</td><td>=</td><td>cv.ximgproc_SuperpixelSEEDS.getLabelContourMask(</td><td class="paramname">[, image[, thick_line]]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Returns the mask of the superpixel segmentation stored in <a class="el" href="../../df/d81/classcv_1_1ximgproc_1_1SuperpixelSEEDS.html" title="Class implementing the SEEDS (Superpixels Extracted via Energy-Driven Sampling) superpixels algorithm...">SuperpixelSEEDS</a> object. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">image</td><td>Return: CV_8UC1 image mask where -1 indicates that the pixel is a superpixel border, and 0 otherwise.</td></tr>
    <tr><td class="paramname">thick_line</td><td>If false, the border is only one pixel wide, otherwise all pixels at the border are masked.</td></tr>
  </table>
  </dd>
</dl>
<p>The function return the boundaries of the superpixel segmentation.</p>
<dl class="section note"><dt>Note</dt><dd><ul>
<li>(Python) A demo on how to generate superpixels in images from the webcam can be found at opencv_source_code/samples/python2/seeds.py<ul>
<li>(cpp) A demo on how to generate superpixels in images from the webcam can be found at opencv_source_code/modules/ximgproc/samples/seeds.cpp. By adding a file image as a command line argument, the static image will be used instead of the webcam.</li>
<li>It will show a window with the video from the webcam with the superpixel boundaries marked in red (see below). Use Space to switch between different output modes. At the top of the window there are 4 sliders, from which the user can change on-the-fly the number of superpixels, the number of block levels, the strength of the boundary prior term to modify the shape, and the number of iterations at pixel level. This is useful to play with the parameters and set them to the user convenience. In the console the frame-rate of the algorithm is indicated.</li>
</ul>
</li>
</ul>
</dd></dl>
<div class="image">
<img alt="superpixels_demo.png" src="../../superpixels_demo.png"/>
<div class="caption">
image</div></div>
</div>
</div>
<a id="a093b40b471c2514f2a846799889a1b54"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a093b40b471c2514f2a846799889a1b54">◆ </a></span>getLabels()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void cv::ximgproc::SuperpixelSEEDS::getLabels </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> </td>
          <td class="paramname"><em>labels_out</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>labels_out</td><td>=</td><td>cv.ximgproc_SuperpixelSEEDS.getLabels(</td><td class="paramname">[, labels_out]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Returns the segmentation labeling of the image. </p>
<p>Each label represents a superpixel, and each pixel is assigned to one superpixel label.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">labels_out</td><td>Return: A CV_32UC1 integer array containing the labels of the superpixel segmentation. The labels are in the range [0, <a class="el" href="../../df/d81/classcv_1_1ximgproc_1_1SuperpixelSEEDS.html#aa0302b0c60c86a8e6cbb437542b2f9f5" title="Calculates the superpixel segmentation on a given image stored in SuperpixelSEEDS object...">getNumberOfSuperpixels()</a>].</td></tr>
  </table>
  </dd>
</dl>
<p>The function returns an image with ssthe labels of the superpixel segmentation. The labels are in the range [0, <a class="el" href="../../df/d81/classcv_1_1ximgproc_1_1SuperpixelSEEDS.html#aa0302b0c60c86a8e6cbb437542b2f9f5" title="Calculates the superpixel segmentation on a given image stored in SuperpixelSEEDS object...">getNumberOfSuperpixels()</a>]. </p>
</div>
</div>
<a id="aa0302b0c60c86a8e6cbb437542b2f9f5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa0302b0c60c86a8e6cbb437542b2f9f5">◆ </a></span>getNumberOfSuperpixels()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual int cv::ximgproc::SuperpixelSEEDS::getNumberOfSuperpixels </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.ximgproc_SuperpixelSEEDS.getNumberOfSuperpixels(</td><td class="paramname"></td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Calculates the superpixel segmentation on a given image stored in <a class="el" href="../../df/d81/classcv_1_1ximgproc_1_1SuperpixelSEEDS.html" title="Class implementing the SEEDS (Superpixels Extracted via Energy-Driven Sampling) superpixels algorithm...">SuperpixelSEEDS</a> object. </p>
<p>The function computes the superpixels segmentation of an image with the parameters initialized with the function <a class="el" href="../../df/d6c/group__ximgproc__superpixel.html#gabda19d839f775cbb527fffec133bc4ea" title="Initializes a SuperpixelSEEDS object. ">createSuperpixelSEEDS()</a>. </p>
</div>
</div>
<a id="afc35736ae52b277a1708b54037598cbb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afc35736ae52b277a1708b54037598cbb">◆ </a></span>iterate()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void cv::ximgproc::SuperpixelSEEDS::iterate </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>img</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>num_iterations</em> = <code>4</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>None</td><td>=</td><td>cv.ximgproc_SuperpixelSEEDS.iterate(</td><td class="paramname">img[, num_iterations]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Calculates the superpixel segmentation on a given image with the initialized parameters in the <a class="el" href="../../df/d81/classcv_1_1ximgproc_1_1SuperpixelSEEDS.html" title="Class implementing the SEEDS (Superpixels Extracted via Energy-Driven Sampling) superpixels algorithm...">SuperpixelSEEDS</a> object. </p>
<p>This function can be called again for other images without the need of initializing the algorithm with <a class="el" href="../../df/d6c/group__ximgproc__superpixel.html#gabda19d839f775cbb527fffec133bc4ea" title="Initializes a SuperpixelSEEDS object. ">createSuperpixelSEEDS()</a>. This save the computational cost of allocating memory for all the structures of the algorithm.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">img</td><td>Input image. Supported formats: CV_8U, CV_16U, CV_32F. Image size &amp; number of channels must match with the initialized image size &amp; channels with the function <a class="el" href="../../df/d6c/group__ximgproc__superpixel.html#gabda19d839f775cbb527fffec133bc4ea" title="Initializes a SuperpixelSEEDS object. ">createSuperpixelSEEDS()</a>. It should be in HSV or Lab color space. Lab is a bit better, but also slower.</td></tr>
    <tr><td class="paramname">num_iterations</td><td>Number of pixel level iterations. Higher number improves the result.</td></tr>
  </table>
  </dd>
</dl>
<p>The function computes the superpixels segmentation of an image with the parameters initialized with the function <a class="el" href="../../df/d6c/group__ximgproc__superpixel.html#gabda19d839f775cbb527fffec133bc4ea" title="Initializes a SuperpixelSEEDS object. ">createSuperpixelSEEDS()</a>. The algorithms starts from a grid of superpixels and then refines the boundaries by proposing updates of blocks of pixels that lie at the boundaries from large to smaller size, finalizing with proposing pixel updates. An illustrative example can be seen below.</p>
<div class="image">
<img alt="superpixels_blocks2.png" src="../../superpixels_blocks2.png"/>
<div class="caption">
image</div></div>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>opencv2/ximgproc/<a class="el" href="../../d5/daf/seeds_8hpp.html">seeds.hpp</a></li>
</ul>
</div><!-- contents -->
<!-- HTML footer for doxygen 1.8.6-->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Apr 2 2021 11:36:49 for OpenCV by  <a href="http://www.doxygen.org/index.html">
<img alt="doxygen" class="footer" src="../../doxygen.png"/>
</a> 1.8.13
</small></address>
<script type="text/javascript">
//<![CDATA[
addTutorialsButtons();
//]]>
</script>
</body>
</html>
